<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <jsp:include page="/static/common/easyui_header.jsp"></jsp:include>
    <script type="text/javascript" src="/static/js/views/formalstudent.js"></script>
    <title>正式客户管理</title>
</head>
<body>
    <table id="formalStudent_datagrid"></table>

    <%--工具栏--%>
    <div id="formalStudent_datagrid_toolbar">
        <a class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" data-cmd="editStudent">编辑</a>
        <a class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="reloadStudent">刷新</a>
        <a class="easyui-linkbutton" data-options="iconCls:'icon-view',plain:true" data-cmd="viewStudent">查看</a>
        <a class="easyui-linkbutton" data-options="iconCls:'icon-transfer',plain:true" data-cmd="transferClass">转班</a>
        <a class="easyui-linkbutton" data-options="iconCls:'icon-lock',plain:true" data-cmd="transferClass">留级</a>
        <a class="easyui-linkbutton" data-options="iconCls:'icon-join',plain:true" data-cmd="upgrade">升班</a>
        <a class="easyui-linkbutton" id="btn_quit" data-options="iconCls:'icon-enabled',plain:true" data-cmd="quitStudent">休学</a>
        <a class="easyui-linkbutton" data-options="iconCls:'icon-dropOut',plain:true" data-cmd="lostStudent">退学</a>

    </div>
    <%--编辑dialog的buttons--%>
    <div id="formalStudent_edit_btns">
        <a class="easyui-linkbutton" iconCls="icon-save" plain="true" data-cmd="saveFormalStudent">保存</a>
        <a class="easyui-linkbutton" iconCls="icon-cancel" plain="true" data-cmd="cancel">取消</a>
    </div>
    <%--转班dialog的buttons--%>
    <div id="formalStudent_transfer_btns">
        <a class="easyui-linkbutton" iconCls="icon-save" plain="true" data-cmd="saveTransfer">保存</a>
        <a class="easyui-linkbutton" iconCls="icon-cancel" plain="true" data-cmd="cancelTransfer">取消</a>
    </div>
    <%--退学dialog的buttons--%>
    <div id="formalStudent_leaving_btns">
        <a class="easyui-linkbutton" iconCls="icon-save" plain="true" data-cmd="saveLost">保存</a>
        <a class="easyui-linkbutton" iconCls="icon-cancel" plain="true" data-cmd="cancelLost">取消</a>
    </div>
    <%--升班dialog的buttons--%>
    <div id="formalStudent_upgrade_btns">
        <a class="easyui-linkbutton" iconCls="icon-save" plain="true" data-cmd="saveUpgrade">保存</a>
        <a class="easyui-linkbutton" iconCls="icon-cancel" plain="true" data-cmd="cancelUpgrade">取消</a>
    </div>
    <%--退学操作的dialog弹窗--%>
    <div id="formalStudent_lostStudent_dialog" class="easyui-dialog" data-options="title:'学员退学',
                                                closed:true,buttons:'#formalStudent_leaving_btns',height:'auto'">
        <form id="formalStudent_lostStudent_form" method="post">
            <input id="StudentId" type="hidden" name="id">
            <table align="center" style="margin-top: 20px" cellspacing="10px" cellpadding="5px">
                <tr>
                    <td>是否退款</td>
                    <td>
                        <label>
                            <input type="radio" name="moneyback" value="1">
                            <span style="font-size: 12px">是</span>
                        </label>&nbsp;&nbsp;&nbsp;
                        <label>
                            <input type="radio" name="moneyback" value="0">
                            <span style="font-size: 12px">否</span>
                        </label>
                    </td>
                </tr>
                <tr style="height: 20px;"></tr>
                <tr>
                    <td>退学阶段</td>
                    <td>
                        <select class="easyui-combobox" style="width: 150px; height: 28px;" name="leavingStage"
                                data-options="panelHeight:'auto'">
                            <option value="0">基础班</option>
                            <option value="1">大神班</option>
                        </select>
                    </td>
                </tr>
                <tr style="height: 20px;"></tr>
                <tr id="backMoneyAmount_tr">
                    <td>退款金额</td>
                    <td><input class="easyui-numberbox" name="backMoneyAmount" style="width: 150px; height: 28px;"/>
                    </td>
                </tr>
                <tr style="height: 20px;"></tr>
                <tr>
                    <td>退学原因</td>
                    <td>
                        <textarea name="leavingReason" style="width: 150px;height: 60px"></textarea>
                    </td>
                </tr>
            </table>
        </form>
    </div>
    <%--转班操作的dialog弹窗--%>
    <div id="formalStudent_transfer_dialog" class="easyui-dialog" data-options="title:'学员转班',closed:true,buttons:'#formalStudent_transfer_btns'">
        <form id="formalStudent_transfer_form" method="post" class="easyui-form">
            <table align="center" style=" cellspacing:10px; cellpadding:5px;padding: 10px">
                <tr>
                    <td>要转入的班级</td>
                    <td><input type="text" class="easyui-combobox" name="clz.id" style="width: 180px; height: 28px;"
                               data-options="url:'/classgrade/listAllClassGradeJson',valueField:'id',textField:'name',panelHeight:'auto' "/>
                    </td>
                </tr>
            </table>
        </form>
    </div>
    <%--升班操作的dialog弹窗--%>
    <div id="formalStudent_upgrade_dialog" class="easyui-dialog" data-options="title:'学员转班',closed:true,buttons:'#formalStudent_upgrade_btns'">
        <form id="formalStudent_upgrade_form" method="post" class="easyui-form">
            <table align="center" style=" cellspacing:10px; cellpadding:5px;padding: 10px">
                <tr>
                    <td>所在班级</td>
                    <td><input type="text" class="easyui-combobox" name="nowClz" style="width: 180px; height: 28px;"
                               data-options="url:'/classgrade/listAllBaseClz',valueField:'id',textField:'name',panelHeight:'auto' "/>
                    </td>
                </tr>
                <tr>
                    <td>要转入的班级</td>
                    <td><input type="text" class="easyui-combobox" name="newClz" style="width: 180px; height: 28px;"
                               data-options="url:'/classgrade/listAllGodClz',valueField:'id',textField:'name',panelHeight:'auto' "/>
                    </td>
                </tr>
            </table>
        </form>
    </div>

    <%--编辑dialog弹窗--%>
    <div id="formalstudent_dialog" class="easyui-dialog" style="padding: 10px" data-options="title:'学员编辑',closed:true,buttons:'#formalStudent_edit_btns'">
        <form id="formalStudent_edit_form" method="post">
            <div id="tt" class="easyui-tabs" style="width:650px;height:390px;">
                <div title="基本信息">
                    <input type="hidden" name="id">
                    <table align="center" style="font-size: 12px" width="600px" cellpadding="0px" cellspacing="0px">
                        <tr style="height: 10px"></tr>
                        <tr>
                            <td colspan="6">
                                <span style="font-size: 16px;color: #00aff0"><b>基本信息</b></span>
                            </td>
                        </tr>

                        <tr style="height: 25px">
                            <td><span style="font-size: 12px">姓名:</span></td>
                            <td><input class="easyui-validatebox formalStudent_view" name="studentName" style="width: 120px;height: 21px;"/></td>
                            <td><span style="font-size: 12px">年龄:</span></td>
                            <td><input type="text" name="client.age" class="formalStudent_view" style="width: 120px;height: 21px;"></td>
                            <td><span style="font-size: 12px">性别:</span></td>
                            <td>
                                <select class="easyui-combobox formalStudent_view" name="client.gender" style="width: 120px;height: 21px;"
                                        data-options="panelHeight:'auto'">
                                    <option value="男">男</option>
                                    <option value="女">女</option>
                                </select>
                            </td>
                        </tr>
                        <tr style="height: 25px">
                            <td><span style="font-size: 12px">QQ:</span></td>
                            <td><input type="text" name="client.qq" class="formalStudent_view" style="width: 120px;height: 21px;"/></td>
                            <td><span style="font-size: 12px">电话:</span></td>
                            <td><input type="text" data-options="" name="tel" class="formalStudent_view" style="width: 120px;height: 21px;"></td>
                            <td><span style="font-size: 12px">地址:</span></td>
                            <td><input type="text" name="client.address" class="formalStudent_view" style="width: 120px;height: 21px;"></td>
                        </tr>
                        <tr style="height: 25px">
                            <td><span style="font-size: 12px">邮箱:</span></td>
                            <td><input class="easyui-validatebox formalStudent_view" data-options=""
                                       name="client.email" style="width: 120px;height: 21px;"/></td>
                            <td><span style="font-size: 12px">入学时间:</span></td>
                            <td><input class="easyui-datebox formalStudent_view" name="enrollTime" style="width: 120px;height: 21px;"/></td>
                            <td><span style="font-size: 12px">学员来源:</span></td>
                            <td><input type="text" class="easyui-combobox formalStudent_view" name="client.source.id"
                                       style="width: 120px;height: 21px;"
                                       data-options="url:'/systemDictionaryItem/listAllItemBySn?sn=source',valueField:'id',textField:'name',panelHeight:'auto'">
                            </td>
                        </tr>
                        <tr style="height: 25px">
                            <td><span style="font-size: 12px">学历:</span></td>
                            <td><input type="text" class="easyui-combobox formalStudent_view"
                                       data-options="url:'/systemDictionaryItem/listAllItemBySn?sn=eduBackground',valueField:'id',textField:'name',panelHeight:'auto'"
                                       name="client.eduBackground.id" style="width: 120px;height: 21px;"></td>
                            <td><span style="font-size: 12px">学校:</span></td>
                            <td><input type="text" name="client.school" class="formalStudent_view" style="width: 120px;height: 21px;"></td>
                            <td><span style="font-size: 12px">专业:</span></td>
                            <td><input type="text" name="client.major" class="formalStudent_view" style="width: 120px;height: 21px;"></td>
                        </tr>
                        <tr style="height: 25px">
                            <td><span style="font-size: 12px">工作年限:</span></td>
                            <td><input type="text" name="client.yearsOfWorking" class="formalStudent_view" style="width: 120px;height: 21px;"></td>
                            <td><span style="font-size: 12px">所在班级:</span></td>
                            <td><input type="text" class="easyui-combobox formalStudent_view" name="clz.id"
                                       data-options="url:'/classgrade/listAllClassGradeJson',valueField:'id',textField:'name',panelHeight:'auto'"
                                       style="width: 120px;height: 21px;"/>
                            </td>
                            <td><span style="font-size: 12px">付款方式:</span></td>
                            <td><input type="text" class="easyui-combobox formalStudent_view" name="paymentMethod.id"
                                       style="width: 120px;height: 21px;"
                                       data-options="url:'/systemDictionaryItem/listAllItemBySn?sn=size',valueField:'id',textField:'name',panelHeight:'auto'">
                            </td>
                        </tr>
                        <tr style="height: 25px">
                            <td><span style="font-size: 12px">营销人员:</span></td>
                            <td><input type="text"  name="saleman.realName" class="formalStudent_view"
                                       style="width: 120px;height: 21px;"
                                       data-options="panelHeight:'auto'" readonly>
                            </td>
                            <td><span style="font-size: 12px">所在校区:</span></td>
                            <td><input type="text" class="easyui-combobox formalStudent_view" name="client.campus.id"
                                       style="width: 120px;height: 21px;"
                                       data-options="url:'/systemDictionaryItem/listAllItemBySn?sn=campus',valueField:'id',textField:'name',panelHeight:'auto'">
                            </td>
                        </tr>
                        <tr style="height: 10px"></tr>
                        <tr>
                            <td colspan="6">
                                <span style="font-size: 16px;color: #00aff0"><b>缴费信息</b></span>
                            </td>
                        </tr>
                        <tr style="height: 25px">
                            <td><span style="font-size: 12px">应缴学费:</span></td>
                            <td><input type="text" name="receivable" style="width: 120px;height: 21px;" readonly="readonly"></td>
                            <td><span style="font-size: 12px">优惠金额:</span></td>
                            <td><input type="text" name="discount" style="width: 120px;height: 21px;" readonly="readonly"></td>
                            <td><span style="font-size: 12px">总学费:</span></td>
                            <td><input type="text" name="totalTuition" style="width: 120px;height: 21px;" readonly="readonly"></td>
                        </tr>
                        <tr style="height: 25px">
                            <td><span style="font-size: 12px">其他费用:</span></td>
                            <td><input type="text" name="otherCost" style="width: 120px;height: 21px;" readonly="readonly"></td>
                            <td><span style="font-size: 12px">优惠说明:</span></td>
                            <td><input type="text" name="discountInfo" style="width: 120px;height: 21px;" readonly="readonly"></td>
                            <td><span style="font-size: 12px">预付学费:</span></td>
                            <td><input type="text" name="advance" style="width: 120px;height: 21px;" readonly="readonly"></td>
                        </tr>
                        <tr style="height: 25px">
                            <td><span style="font-size: 12px">已付学费:</span></td>
                            <td><input type="text" name="alreadyPaid" style="width: 120px;height: 21px;" readonly="readonly"></td>
                            <td><span style="font-size: 12px">还欠学费:</span></td>
                            <td><input type="text" name="remainPaid" style="width: 120px;height: 21px;" readonly="readonly"></td>
                            <td><span style="font-size: 12px">最后付款时间:</span></td>
                            <td><input class="easyui-datebox" name="paymentTime" style="width: 120px;height: 21px;" readonly="readonly">
                            </td>
                        </tr>
                    </table>
                </div>

                <div title="私密信息" data-options="closable:true" style="overflow:auto;padding:20px;display:none;">
                    <table align="center" style="border-collapse:separate; border-spacing:0px 10px;">
                        <tr>
                            <%--<td rowspan="3" align="center" width="20px">
                                <div id="headImg"></div>
                                <input type="file" name="headImg" onchange="preview(this)"/>
                            </td>--%>
                            <%--<td width="10"></td>--%>
                            <td ><span style="font-size: 12px">身份证号:</span></td>
                            <td><input type="text" name="idnum" class="formalStudent_view" size="35"></td>
                        </tr>
                        <tr>
                            <%--<td width="10"></td>--%>
                            <td ><span style="font-size: 12px">紧急联系人:</span></td>
                            <td><input type="text" name="emergencyContact" class="formalStudent_view" size="35"></td>
                        </tr>
                        <tr>
                            <%--<td width="10"></td>--%>
                            <td ><span style="font-size: 12px">紧急联系电话:</span></td>
                            <td><input type="text" name="emergencyTel" class="formalStudent_view" size="35"></td>
                        </tr>
                    </table>


                    <HR width="100%" color="white" SIZE=2>
                    <table align="center" cellpadding="5px">
                        <tr>
                            <td align="right"><span style="font-size: 12px">备注</span>:</td>
                            <td colspan="3"><textarea name="client.remark"
                                                      style="width: 450px;height: 130px"></textarea></td>
                        </tr>
                    </table>
                </div>
            </div>
        </form>
    </div>


    <%--查看的dialog弹窗--%>
    <%--复制编辑的弹窗并且设置所有字段属性为readOnly--%>

    <%--<div id="formalStudent_lostStudent_dialog" class="easyui-dialog" title="添加,"
         data-options="buttons:'#formalStudent_leaving_btns',closed:true">
        <form id="formalStudent_lostStudent_form" method="post">
            <input type="hidden" name="id" id="leavingStudent_id">
            <table>
                <tr>
                    <td>是否退款</td>
                    <td>
                        <select  class="easyui-combobox" name="moneyback" style="width:200px;">
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </td>
                </tr>

                <tr>
                    <td>流失阶段</td>
                    <td>
                        <select  class="easyui-combobox" name="leavingStage" style="width:200px;">
                            <option value="1">大神班阶段</option>
                            <option value="0">基础班阶段</option>
                        </select>
                    </td>
                </tr>

                <tr>
                    <td>退款金额</td>
                    < <td><input name="backMoneyAmount" ,class="easyui-textbox"></td>
                </tr>
                <tr>
                <tr>
                    <td>退学原因</td>
                    <td><input name="leavingReason" class="easyui-textbox" data-options="multiline:true"  style="width:300px;height:100px"></td>
                </tr>
                </tr>

            </table>
        </form>

    </div>--%>
</body>
</html>
